/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.v1.jitclouds.mda.datatypes;

/**
 *
 * @author aliriosa
 */
public class BasicMachine implements IMachine{

    private String idHost = null;
    private Guesttable hGuests = new Guesttable();
    private String descMachine = null;
    private boolean local = true;
    
    @Override
    public String getID() {
        return idHost;
    }
    
    @Override
    public void setID(String idHost){
        this.idHost = idHost;
    }

    @Override
    public GuestList getGuests() {
        
        GuestList oGuests = new GuestList();
        oGuests.addAll(hGuests.values());
        
        return oGuests;
        
    }
    
    @Override
    public void addGuest(String idGuest, IGuest guest) {
        hGuests.put(idGuest, guest);
    }

    @Override
    public void delGuest(String idGuest) {
        hGuests.remove(idGuest);
    }

    @Override
    public IGuest getGuest(String idGuest) {
        return hGuests.get(idGuest);
    }

    @Override
    public String getDescription() {
        return this.descMachine;
    }

    @Override
    public void setDescription(String description) {
        descMachine = description;
    }

    @Override
    public boolean isLocal() {
        return local;
    }

    @Override
    public void setLocal(boolean local) {
        this.local = local;
    }
    
}
